#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int origin(int k)  //计算某数的各位数字之和
{
	int sum = 0;
	while (k)
	{
		sum += k % 10;
		k /= 10;
	}
	return sum;
}

int insist(int k)  //判断某个数是否为不变初心数,若是则返回初心
{
	int x, y, count = 0;
	x = origin(k);

	for (int i = 2; i < 10; i++)
	{
		y = origin(k * i);  //计算乘2-9之后数字的初心
		if (y != x)
			break;
		count++;
	}

	if (count == 8)
		return x;
	else
		return 0;
}

int main()
{
	int m, n, count = 0;
	scanf("%d %d", &m, &n);

	for (int i = m; i <= n; i++)
	{
		int k = insist(i);
		if (k)
		{
			printf("%d(%d)\n", i, k);
			count++;
		}
	}

	if (count == 0)  //判断给定区间内是否存在不变初心数
		printf("None");
	return 0;
}